import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import NoPermission from './views/403.vue'
import Home from './views/Home.vue'

import echarts from './views/charts/echarts.vue'

import ShopRegister from "./views/ShopRegister";
import Tenant from "./views/sys/Tenant";
import TenantType from "./views/sys/TenantType";
import Meal from "./views/sys/Meal";
import Employee from "./views/sys/Employee";
import Department from "./views/sys/Department";
import UserInfo from "./views/user/UserInfo";
import User from "./views/user/User";
import Address from "./views/user/Address";
import GrowLog from "./views/user/GrowLog";


let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: Home,
        name: '404',
        hidden: true,
        children: [
            { path: '/404', component: NotFound, name: '404' }
        ]
    },
    {
        path: '/403',
        component: Home,
        name: '403',
        hidden: true,
        children: [
            { path: '/403', component: NoPermission, name: '403' }
        ]
    },
    {
        path: '/index',
        component: Home,
        name: '首页',
        iconCls: 'fa fa-bar-chart',
        leaf : true,
        children: [
            { path: '/echarts', component: echarts, name: '首页' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理中心',
        iconCls: 'el-icon-message',
        children: [
            { path: '/department', component: Department, name: '部门管理' },
            { path: '/employee', component: Employee, name: '员工管理' },
            { path: '/tenantType', component: TenantType, name: '租户类型' },
            { path: '/tenant', component: Tenant, name: '租户' },
            { path: '/meal', component: Meal, name: '套餐' },
        ]
    },
    {
        path: '/shopRegister',
        component: ShopRegister,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '用户中心',
        iconCls: 'el-icon-message',
        children: [
            { path: '/userInfo', component: UserInfo, name: '用户信息' },
            { path: '/user', component: User, name: '认证管理' },
            { path: '/address', component: Address, name: '地址列表' },
            { path: '/growLog', component: GrowLog, name: '成长历史' },
        ]
    },

    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;